import { API_HOST_10443, API_HOST_1 } from 'config'
import request from 'request'

export default {

  getConstruction(data = {}) {
    return request({
      url: API_HOST_1 + "daikin/construction/get",
      data: data,
      method: "GET",
      showLoading: true,
      showErrToast: true
    });    
  },

  getSignFilePath(data = {}){
    return request({
      url: API_HOST_1 + "daikin/etract/contract",
      data: data,
      method: "GET",
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      showLoading: true,
      showErrToast: true
    });
  },

  getCouponInfoByProposal(data = {}) {
    return request({
      url: API_HOST_10443 + "wx/userCoupon/getInfoByProposal",
      data: data,
      method: "POST",
      showLoading: true,
      showErrToast: true
    });
  },

  getMatchInfo(data = {}) {
    return request({
      url: API_HOST_10443 + "wx/user/getUserMatchInfo",
      data: data,
      showLoading: true,
      showErrToast: true
    });
  },

  getContractInfo(data = {}) {
    return request({
      url: API_HOST_10443 + "wx/user/getContractDetail",
      data: data,
      showLoading: true,
      showErrToast: true
    });
  },

  getContractList(data = {}) {
    return request({
      url: API_HOST_10443 + "wx/user/getContractList",
      data: data,
      showLoading: true,
      showErrToast: true
    });
  },

  confirmContract(data = {}) {
    return request({
      url: API_HOST_10443 + "wx/user/confirmContract",
      data: data,
      showLoading: true,
      showErrToast: true
    });
  },

  rejectContract(data = {}){
    return request({
      url: API_HOST_10443 + "wx/user/rejectContract",
      data: data,
      showLoading: true,
      showErrToast: true
    });
  },

  bindCouponByContract(data = {}) {
    return request({
      url: API_HOST_10443 + "wx/user/bindCouponByContract",
      data: data,
      showLoading: true,
      showErrToast: true
    });
  },

  geCommentByContract(data = {}) {
    return request({
      url: API_HOST_10443 + "wx/user/getCommentByContactId",
      data: data,
      showLoading: true,
      showErrToast: true
    });
  },

  saveCommentByContract(data = {}) {
    return request({
      url: API_HOST_10443 + "wx/user/saveProposalComment",
      data: data,
      method: "POST",
      showLoading: true,
      showErrToast: true
    });
  },

  modifyContractBaseInfo(data = {}) {
    return request({
      url: API_HOST_10443 + "wx/user/modifyContractBaseInfo?openId=" + data.openId,
      data: data,
      method: "POST",
      showLoading: true,
      showErrToast: true
    });
  },

}